package com.mama100.rpc.terminal.client;

import com.biostime.rpc.terminal.constant.OrderRpcFactory;
import com.mama100.common.finagle.FinagleClientRegister;

public class ClientWithoutSpring {
	OrderRpcFactory factory;

	// 初始化factory
	public void init() {
		FinagleClientRegister register = new FinagleClientRegister();
		register.setConnectTimeout(10000);
		register.setMaxRetry(3);
		register.setnamespace("/rpc/terminal/zhuht");
		register.setZookeeperAddress("test-zookeeper01.biostime.it:2181,test-zookeeper02.biostime.it:2181,test-zookeeper03.biostime.it:2181");
		register.setTimeout(18000);
		factory = new OrderRpcFactory();
		factory.setRegister(register);
	}

	public OrderRpcFactory getFactory() {
		return factory;
	}

	public static void main(String[] args) throws Exception {
		ClientWithoutSpring c = new ClientWithoutSpring();
		c.init();
	}

}
